/**
 * This file is part of mycollab-services.
 *
 * mycollab-services is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * mycollab-services is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with mycollab-services.  If not, see <http://www.gnu.org/licenses/>.
 */
/*Domain class of table m_group*/
package com.mycollab.module.user.domain;

import com.mycollab.core.arguments.ValuedBean;
import com.mycollab.db.metadata.Column;
import com.mycollab.db.metadata.Table;
import java.util.Date;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.hibernate.validator.constraints.Length;

@SuppressWarnings("ucd")
@Table("m_group")
public class Group extends ValuedBean {
    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column m_group.id
     *
     * @mbg.generated Fri Nov 25 23:57:09 ICT 2016
     */
    @Column("id")
    private Integer id;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column m_group.name
     *
     * @mbg.generated Fri Nov 25 23:57:09 ICT 2016
     */
    @Length(max=400, message="Field value is too long")
    @Column("name")
    private String name;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column m_group.sAccountId
     *
     * @mbg.generated Fri Nov 25 23:57:09 ICT 2016
     */
    @Column("sAccountId")
    private Integer saccountid;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column m_group.createdTime
     *
     * @mbg.generated Fri Nov 25 23:57:09 ICT 2016
     */
    @Column("createdTime")
    private Date createdtime;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column m_group.createdUser
     *
     * @mbg.generated Fri Nov 25 23:57:09 ICT 2016
     */
    @Length(max=45, message="Field value is too long")
    @Column("createdUser")
    private String createduser;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column m_group.description
     *
     * @mbg.generated Fri Nov 25 23:57:09 ICT 2016
     */
    @Length(max=16777215, message="Field value is too long")
    @Column("description")
    private String description;

    private static final long serialVersionUID = 1;

    public final boolean equals(Object obj) {
        if (obj == null) { return false;}
        if (obj == this) { return true;}
        if (!obj.getClass().isAssignableFrom(getClass())) { return false;}
        Group item = (Group)obj;
        return new EqualsBuilder().append(id, item.id).build();
    }

    public final int hashCode() {
        return new HashCodeBuilder(1591, 1311).append(id).build();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column m_group.id
     *
     * @return the value of m_group.id
     *
     * @mbg.generated Fri Nov 25 23:57:09 ICT 2016
     */
    public Integer getId() {
        return id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column m_group.id
     *
     * @param id the value for m_group.id
     *
     * @mbg.generated Fri Nov 25 23:57:09 ICT 2016
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column m_group.name
     *
     * @return the value of m_group.name
     *
     * @mbg.generated Fri Nov 25 23:57:09 ICT 2016
     */
    public String getName() {
        return name;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column m_group.name
     *
     * @param name the value for m_group.name
     *
     * @mbg.generated Fri Nov 25 23:57:09 ICT 2016
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column m_group.sAccountId
     *
     * @return the value of m_group.sAccountId
     *
     * @mbg.generated Fri Nov 25 23:57:09 ICT 2016
     */
    public Integer getSaccountid() {
        return saccountid;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column m_group.sAccountId
     *
     * @param saccountid the value for m_group.sAccountId
     *
     * @mbg.generated Fri Nov 25 23:57:09 ICT 2016
     */
    public void setSaccountid(Integer saccountid) {
        this.saccountid = saccountid;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column m_group.createdTime
     *
     * @return the value of m_group.createdTime
     *
     * @mbg.generated Fri Nov 25 23:57:09 ICT 2016
     */
    public Date getCreatedtime() {
        return createdtime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column m_group.createdTime
     *
     * @param createdtime the value for m_group.createdTime
     *
     * @mbg.generated Fri Nov 25 23:57:09 ICT 2016
     */
    public void setCreatedtime(Date createdtime) {
        this.createdtime = createdtime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column m_group.createdUser
     *
     * @return the value of m_group.createdUser
     *
     * @mbg.generated Fri Nov 25 23:57:09 ICT 2016
     */
    public String getCreateduser() {
        return createduser;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column m_group.createdUser
     *
     * @param createduser the value for m_group.createdUser
     *
     * @mbg.generated Fri Nov 25 23:57:09 ICT 2016
     */
    public void setCreateduser(String createduser) {
        this.createduser = createduser;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column m_group.description
     *
     * @return the value of m_group.description
     *
     * @mbg.generated Fri Nov 25 23:57:09 ICT 2016
     */
    public String getDescription() {
        return description;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column m_group.description
     *
     * @param description the value for m_group.description
     *
     * @mbg.generated Fri Nov 25 23:57:09 ICT 2016
     */
    public void setDescription(String description) {
        this.description = description;
    }

    public enum Field {
        id,
        name,
        saccountid,
        createdtime,
        createduser,
        description;

        public boolean equalTo(Object value) {
            return name().equals(value);
        }
    }
}